package com.xiaochong.tir.trades.mqrevTrades;

import com.xiaochong.tir.trades.component.DataSaveHbaseCommon;
import com.xiaochong.tir.trades.rabbit.GateioMqQueue;
import com.xiaochong.tir.trades.rabbit.ZbMqQueue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Description: zb
 * @Author: org
 * @CreateDate: 2018/7/6 16:51
 */
@Component
public class ZbRevTrades {
    @Resource
    private DataSaveHbaseCommon mqDataSaveHbaseCommon;

    @RabbitListener(queues = ZbMqQueue.QUEUE_TRADES_ZB_BTC)
    @RabbitHandler
    public void processZbBtc(byte[] body) {
        mqDataSaveHbaseCommon.MqDataSaveTradesAction(body);
    }

    @RabbitListener(queues = ZbMqQueue.QUEUE_TRADES_ZB_QC)
    @RabbitHandler
    public void processZbQc(byte[] body) {
        mqDataSaveHbaseCommon.MqDataSaveTradesAction(body);
    }

    @RabbitListener(queues = ZbMqQueue.QUEUE_TRADES_ZB_USDT)
    @RabbitHandler
    public void processZbUsdt(byte[] body) {
        mqDataSaveHbaseCommon.MqDataSaveTradesAction(body);
    }

    @RabbitListener(queues = ZbMqQueue.QUEUE_TRADES_ZB_ZB)
    @RabbitHandler
    public void processZbZb(byte[] body) {
        mqDataSaveHbaseCommon.MqDataSaveTradesAction(body);
    }




}
